package com.bitoon.basketdudes.web.jpa;

import java.io.Serializable;
import javax.persistence.*;

@Entity
@Table(name = "usuario", schema="central")

@NamedQueries({
    @NamedQuery(name = "UsuarioLogin.findByNickPassword", query = "SELECT u FROM UsuarioLogin u WHERE u.nick = :nick AND u.password = :password"),
    @NamedQuery(name = "UsuarioLogin.findByNick", query = "SELECT u FROM UsuarioLogin u WHERE u.nick = :nick"),
    @NamedQuery(name = "UsuarioLogin.findByEmail", query = "SELECT u FROM UsuarioLogin u WHERE LOWER(u.email) = :email")
})

public class UsuarioLogin implements Serializable {
    private static long serialVersionUID = 1L;

    @Id
    private Integer id;
    private String nick;
    @Column(name="nick_mostrar")
    private String nickMostrar;
    private String password;
    @Column(name="pais_id")
    private String pais;
    private String email;

    /*    
    private Integer puntos;
    private float creditos;
    @Column(name = "f_alta")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fAlta;
    @Column(name="f_admision")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fAdmision;
    @Column(name="f_ultimo")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fUltimo;
    private Integer status;
    private Integer genero;
    @Column(name="f_nacim")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fNacimiento;
    //bi-directional many-to-one association to Pais
    @ManyToOne
    @JoinColumn(name="pais_id")
    private Pais pais;
    private Integer robinson;
    private Integer lenguaje;
     *
     */

    // Métodos

    public UsuarioLogin() {
        //equipos = new ArrayList<Equipo>();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getNickMostrar() {
        return nickMostrar;
    }

    public void setNickMostrar(String nickMostrar) {
        this.nickMostrar = nickMostrar;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPais() {
        return pais;
    }

    public void setPais(String pais) {
        this.pais = pais;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }


}